package com.cqhilink.iot.jobstandardmanagement.facade.service.workcellinstance;

import com.alibaba.fastjson.JSONObject;
import com.cqhilink.iot.jobstandardmanagement.facade.model.*;

import java.util.List;
import java.util.Map;

/**
 * Created by zmling on 2016/12/8.
 * 工作内容信息
 */
public interface JsmWorkCellInstanceService {

    /**
     * 新增工作内容
     * @param workCellInstance
     * @return
     * @throws Exception
     */
    int  addWorkCellInstance(WorkCellInstance workCellInstance, EmployeeVo employee)throws Exception;

    /**
     * 新增工作内容
     * @param workCellInstance
     * @return
     * @throws Exception
     */
    WorkCellInstance  saveWorkCellInstance(WorkCellInstance workCellInstance, EmployeeVo employee)throws Exception;

    /**
     * 分页查询工作内容信息
     * @param workCellInstance
     * @return
     * @throws Exception
     */
    JSONObject table(WorkCellInstanceVo workCellInstance)throws Exception;

    /**
     * 通过Id查询工作内容信息
     * @param workInstanceId
     * @return
     * @throws Exception
     */
    WorkCellInstanceVo loadWorkCellInstanceView(String workInstanceId)throws Exception;

    /**
     * 删除工作内容
     * @param workInstances
     * @return
     * @throws Exception
     */
    int deleteWorkCellInstance(Map workInstances)throws Exception;

    /**
     * 修改工作内容信息
     * @param workCellInstance
     * @return
     * @throws Exception
     */
    int upateWorkCellInstance(WorkCellInstance workCellInstance,Employee employee)throws Exception;


    /**
     * 为其他系统提供工作内容接口
     * @param workCellInstance
     * @return
     * @throws Exception
     */
    List<WorkCellInstance> outFindWorkCellInstanceList(WorkCellInstance workCellInstance)throws Exception;

    /**
     * @param workCellInstanceVo
     * @return JSONObject
     * @Author 卢曼成
     * @Description
     * @Date 2017/2/24 13:58
     */
    JSONObject queryInstanceInfoUnionList(WorkCellInstanceVo workCellInstanceVo) throws Exception;

    /**
     * 根据ID查询一站一案和操作单元
     * @param workInstanceId
     * @return
     * @throws Exception
     */
    WorkCellInstanceVo queryInstanceInfoUnionById(String workInstanceId) throws Exception;

    /**
     * @param entityTypeId 实体类型Id ， 生产单元id
     */
    List<Ztree> loadZtree(String entityTypeId,String iconSkin) throws Exception;

    /**
     * @param workCellInstanceId 一站一案复制新增
     * @return
     * @throws Exception
     */
    Map<String,Object> copyCard(String workCellInstanceId,EmployeeVo employeeVo) throws Exception ;

    /**
     * 报表统计
     * @param majorStat
     * @return
     */
    MajorStat  majorStatistics(MajorStat majorStat);

    /**
     * 操作单元报表统计
     * @param opItemStat
     * @return
     */
    OpItemStat opItemStat(OpItemStat opItemStat);

}
